﻿namespace CN2P.Web.Db
{
    using System;

    using CN2P.ServiceModel;

    public partial class OrderItem
    {
        public static OrderItem From(OrderItemModel model)
        {
            return new OrderItem
            {
                Id = Guid.NewGuid().ToString(),
                ProdId = model.ProdId,
                ProdName = model.ProdName,
                ProdDesc = model.ProdDesc,
                ProdPrice = model.ProdPrice,
                ImageUrl = model.ImageUrl,
                Quantity = model.Quantity
            };
        }
    }
}